Handling Clock-Skews in Distributed Traces#90
Handling Clock-Skews in Distributed Traces#90suddendust wants to merge 11 commits intohypertrace:mainfrom
Conversation
1. Added ClockskewAdjuster.java, NoOpClockskewAdjuster.java and JaegarBasedClockskewAdjuster.java. 2. Added lombok dependency to gateway-service.
2. Added SpanTransformationPipeline.java. 3. Added factory for ClockskewAdjuster.java.
2. Refactored pipeline code.
|
I think in this kind of fixes it is crucial to have the test cases to understand what use cases we are addressing, otherwise it is hard to follow (yeah, time is evil). |
Codecov Report
@@ Coverage Diff @@
## main #90 +/- ##
============================================
- Coverage 77.07% 76.03% -1.04%
- Complexity 1096 1106 +10
============================================
Files 106 111 +5
Lines 4981 5083 +102
Branches 425 430 +5
============================================
+ Hits 3839 3865 +26
- Misses 954 1029 +75
- Partials 188 189 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Will be adding the tests now. Raised this a bit earlier to keep everyone updated. |
Description
This PR is to handle clock-skews as described here. It is a work-in-progress as the proposal is yet to be approved.
Spans are changed in gateway-service as a part of the span transformation pipeline. A span transformation pipeline registers a list of handlers that transform a supplied list of spans. One such handler is
ClockskewAdjuster.java. I chose this design as this takes care of any new transformations we might have to apply to spans in the query layer.The design assumes that there can be a bunch of strategies to adjust clock-skew (new heuristics can be added in future). Right now we have two strategies - A
NoOpClockskewAdjusteradjuster (doesn't do any adjustment) and aJaegerBasedClockskewAdjuster(copies what Jaegar does). What adjuster to use can be controlled from the app config. Note that this PR does not handle controlling this feature from the UI. That is, once the config has been specified, all spans will then be adjusted.This PR is still in early stages.
JaegerBasedClockskewAdjuster.java's implementation is a bit terse and needs to be improved. I raised this so that everyone is updated on how we are implementing this feature.Testing
ToDo
Checklist:
Documentation
ToDo